<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt"  prefix="c"%>


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Upload Students Form</title>
<link rel="stylesheet" href="css/jquery/theme/jquery-ui-1.9.1.custom.css"/>
 	<link rel="stylesheet" href="css/college.css"/> 
 <script src="js/jquery/jquery-1.8.2.js"></script>
 <script src="js/jquery/jquery-ui-1.9.1.custom.js"></script>
 	
</head>


<c:choose>
		<c:when test="${not empty successfulUploadCount and successfulUploadCount > 0}">
			<c:set var="title" value="Operation Suceeded"></c:set>
			<c:set var="message" value="Successfully uploaded: ${successfulUploadCount} Students"></c:set>
		</c:when>
		<c:when test="${not empty errorMessage}">
			<c:set var="title" value="Error Occured"></c:set>
			<c:set var="message" value="${errorMessage}"></c:set>
		</c:when>
		<c:otherwise>
		</c:otherwise>
	</c:choose>


<body>
<div id="message-dialog" title="${title}" style="display:none;">
		<p>${message}</p>
	</div>
<form:form id="form1" name="form1" method="post" action="uploadstudents.htm" enctype="multipart/form-data" modelAttribute="fileUploadModel">

<div  id="options" align="right">
			<a href="adminhome.htm"  id="back"> Back </a> 
			<a href="iservicehome.htm" id="home">Home</a> 
			<a href="j_spring_security_logout" id="logout">Logout</a> 
</div>
  <h2 align="center" style="margin-top: 5px;">Upload Students Form</h2>
   
  <table  border="0" align="center" cellpadding="5" >
    <tr>
      <td align="right">Select a File:</td>
      <td ><label>
        <form:input type="file" path="file"/>
      </label></td>
    </tr>
   
     <tr>
       <td colspan="2" align="center"><label>
        
      </label></td>
    </tr>
  </table>
  <p align="center"></p>
 <div align="center" id="options" >
			
			<input type="submit" name="save" id="save" value="Upload Students" />
</div>
</form:form>

<script src="js/college.js"></script>
<script type="text/javascript">
	$(function() {
		
		
		var title = "<c:out value='${title}'/>";
		if(title) {
			//alert();
			showDialog("message-dialog");
		
		}
			
		
		
	});
</script>
</body>
</html>
